#include <stdio.h>
#include "../../liboctopus/src/octopus.h"


#define PIN 38

int
main ()
{

  struct octopus_context octopus;

  octopus_init (&octopus);
  octopus_open (&octopus);
  
  octopus_adc_init (&octopus, PIN);
  //octopus_adc_ref (&octopus, 2);	//AVCC


  int value;
  while (1)
	 {
		value = octopus_adc_get (&octopus, PIN);
		//printf ("Wert: %i, %i, %i, %i\n", eins, nichteins,value,((unsigned char)value & 0x01) ? 1 : 0);
		printf ("Wert: %i\n", value);
		//if((unsigned char)value & 0x01)
		// eins++; 
                //else nichteins++;
		//ocotpus_uart_write("Wert: %i\n", value);
		//sleep (1);
	 }

  return 0;


}
